<?php
/*******************************************************************************
 *
 *  Name: viewincidentsview
 *
 *  Date: 05/03/2012
 *  
 *  Description: Shows the simple list of incidents that an analyst has
 *               created.
 *  
 *  Author: Hayden Waisanen
 *  
 *  Todo:
 *     NONE
 *
 *  Modification History:  
 * 
 *   Date         Name
 *  ----------   --------------
 *  2012-04-25   HAYDEN WAISANEN
 *  2012-04-22   HAYDEN WAISANEN
 * 
 *****************************************************************************/
?>
<h3><?php echo $title; ?></h2>
<table border="2px"> 
<tr>
<td>IncidentID</td>
<td>Name</td>
<td>Analyst ID</td>
<td>Status</td>
<td>View/Edit</td>
</tr>
<?php
foreach ($entries as $entry)
{
   
   switch($entry['Status']) {
      case 0:
         $Status = 'Compiling';
         break;
      case 1: 
         $Status = 'Awaiting Repair';
         break;
      case 2: 
         $Status = 'Under Repair';
         break;
      case 3:
         $Status = 'Resolved';
         break;
   }

   echo "<tr>";
   echo '<td>'.$entry["IncidentID"].'</td>';
   echo '<td>'.$entry["Name"].'</td>';
   echo '<td>'.$entry["AnalystID"].'</td>';
   echo '<td>'.$Status.'</td>';
   echo '<td>'.anchor('analyst/viewincident/'.$entry["IncidentID"].'/', 'View/Edit').'</td>';
   echo "<tr>";
}
?>
</table>
